package com.fesine.ch02.volatileTestThread;

/**
 * @description: 类描述
 * @author: Fesine
 * @createTime:2016/7/12 20:04
 * @update:修改内容
 * @author: Fesine
 * @updateTime:2016/7/12 20:04
 */
public class MyThread extends Thread {
    volatile public static int count;
    private static void addCount() {
        for (int i = 0; i < 100; i++) {
            count++;
        }
        System.out.println("count="+count);
    }

    @Override
    public void run() {
        addCount();
    }
}
